/**
 * Copyright (c) 2018-2099, Chill Zhuang 庄骞 (bladejava@qq.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springblade.modules.restaurant.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springblade.core.mp.base.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.util.Date;

/**
 * 任务表实体类
 *
 * @author Blade
 * @since 2025-01-21
 */
@Data
@TableName("restaurant_task")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "任务表")
public class Task extends TenantEntity {

	@Serial
	private static final long serialVersionUID = 1L;
	/**
	 * 任务时间
	 */
	@Schema(description = "任务时间")
	private String taskTime;
	/**
	 * 区域ID群组 (2025-03-20后修改 仅支持单区域)
	 */
	@Schema(description = "区域ID群组")
	private String areaIds;
	/**
	 * 任务名
	 */
	@Schema(description = "任务名")
	private String taskName;
	/**
	 * 注意事项
	 */
	@Schema(description = "注意事项")
	private String announcements;
	/**
	 * 示例图
	 */
	@Schema(description = "示例图")
	private String sampleGraph;
	/**
	 * 类型(0固定任务 1特定任务)
	 */
	@Schema(description = "类型(0固定任务 1特定任务)")
	private Integer type;
	/**
	 * 特定任务用户群 (2025-03-20后修改 仅支持单用户)
	 */
	@Schema(description = "特定任务用户群")
	private String userIds;
	/**
	 * 任务周期 0 仅一次 1 每天一次 2 每周一次 3 每月一次
	 */
	@Schema(description = "任务周期 0 仅一次 1 每天一次 2 每周一次 3 每月一次")
	private Integer cycle;

	/**
	 * 最后一次下发时间
	 */
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Schema(description = "最后一次下发时间")
	private Date lastTime;
	/**
	 * 任务类型 0 午餐开市 1 晚餐开市 2 午餐收市 3 晚餐收市 4 收市 5 特定工作
	 */
	@Schema(description = "任务类型 0 午餐开市 1 晚餐开市 2 午餐收市 3 晚餐收市 4 收市 5 特定工作")
	private Integer timeType;
	/**
	 * 截止日期
	 */
	@Schema(description = "截止日期")
	private String deadline;

	/**
	 * 检查截止日期
	 */
	@Schema(description = "检查截止日期")
	private String inspectDeadline;
}
